package com.hengpeng.itfin.persist.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.hengpeng.common.persist.AbstractDao;
import com.hengpeng.itfin.persist.DrawingDao;
import com.hengpeng.itfinbase.persist.Drawing;
import com.hengpeng.itfinbase.persist.Drawing.DrawingState;

@Repository
public class DrawingDaoImpl extends AbstractDao<Drawing> implements DrawingDao
{

	@Override
	public List<Drawing> getListByState(DrawingState state, String providerId)
	{
		return super.findAllByNamedQuery("drawing.bystate", new Object[] { state, providerId });
	}

	@Override
	public void updateState(Long id, DrawingState state)
	{
		super.exeNamedQuery("drawing.updateState", new Object[] { state, id });
	}

}
